#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int num1 = 0;
    int num2 = 0;
    int Temp = 0;
    int count = 0;
    scanf("%d %d", &num1, &num2);
    Temp = num1 ^ num2;
    while (Temp != 0)
    {
        count++;
        Temp = Temp & (Temp - 1);
    }
    printf("%d\n", count);
    return 0;
}